﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace ProjetoFinal
{
    class Creditos
    {
        Texture2D telaCreditos;
        Texture2D botao;

        public Creditos()
        {
        }


        public void LoadContent(ContentManager content)
        {
            telaCreditos = content.Load<Texture2D>("telacreditos");
            botao = content.Load<Texture2D>("botaomacaco");
        }


        public void Update(KeyboardState tecladoAtual, KeyboardState tecladoAnterior)
        {
            if (tecladoAtual.IsKeyDown(Keys.Space) && !tecladoAnterior.IsKeyDown(Keys.Space))
            {
                Manager.estadoAtual = Manager.estadosJogo.Menu;
            }
           tecladoAtual = tecladoAnterior;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(telaCreditos, new Vector2(0, 0), Color.White);
            spriteBatch.Draw(botao, new Vector2(750, 500), Color.White);
            spriteBatch.End();
        }
    
    }
}
